<?php foreach ($this->friendss as $friend):?>
 	<div id="<?php echo $this->page?>" class="message_box">
    	
        <?php $cur_user_id = Zend_Auth::getInstance()->getIdentity()->id;?>
    	<?php $user_id_model = $friend->id;?>
    	<?php $model_user = new Model_User($user_id_model)?>
    	
    	
            		
    
    
    	<a
    	href="<?php
        echo $this->url(array('controller' => $model_user->login, 'action' => null, 'request'=>null),"default")?>"><?php
        echo $model_user->login
        ?>
        
        		<?php if ($model_user->avatar == null) : ?> 
        			<img src="<?php echo $this->baseUrl('img' . DIRECTORY_SEPARATOR . $model_user->gender)?>sex_ava.png" alt="avatar image"> 
        		<?php else : ?> 
        			<img src="<?php echo $this->baseUrl('upload' . DIRECTORY_SEPARATOR . $model_user->avatar)?>"width="150" alt="avatar image"> 
        		<?php endif;?>
        </a> 
        
            <?php if($model_user->checkOnline($user_id_model)){
        	echo $this->translate("Online");
        		}else{
        	echo $this->translate("Offline");
        		}
        ?>
    	
        <br/>
     </div>
    <?php endforeach;?>
    <div id="last_msg_loader"></div>